<table class="layui-table">
<? $device=select_one_line_all_items($table_Prefix."rpa_device_data","nid ='".$_REQUEST['nid']."'");?>
<? $task_list =select_lines_all_items($table_Prefix."rpa_action_data","nid desc","device_uid ='".$device['device_uid']."' ","");?>

  <colgroup>
        <col>
  </colgroup>
  <thead>
    <tr>
      <th>分/时</th>
       <? for ($j = 0; $j < 24; $j++)
       {echo "<th>".$j."</th>";}
       ?>
    </tr>
  </thead>  
  <tbody>

  <?php
	for ($i = 0; $i < 60; $i++) {
    ?>
        <tr id="item<?echo $task_list[$i]['nid']?>" >
        <td><?echo $i?></td>
            <? for ($j = 0; $j < 24; $j++){?>
            <td>
                <?
                    foreach ($task_list as $key => $value)
                    {
                        //提取$task_list[$i]['on_time']的时 和分 ，赋值给变量hour 和 miu

                        $hour=substr($value['on_time'],11,2);
                        $miu =substr($value['on_time'],14,2);
                        //echo "<br/>";

                        //判断当前的日期时间，i是分，j是时，是否和$task_list的on_time对得上，对上则显示
                        if ($hour==$j and $miu==$i)
                        {
                            echo $value['plateform']."<br/>".$value['action'];
                        }


                    }




                ?>
            </td>
            <?;} ?>
        </tr>


  <?php
}
?>



  </tbody>
</table>
